package com.lytoyo.neihanduanzi.model.blog;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lytoyo.neihanduanzi.model.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

/**
 * Package:com.lytoyo.neihanduanzi.model.blog
 *
 * @ClassName:BlogComment
 * @Create:2025/3/16 10:41
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Component
@TableName("blog_comment")
public class BlogComment extends BaseEntity {
    private static final long serialVersionUID = 2L;

    @TableField("blog_id")
    private Long blogId;

    @TableField("user_id")
    private Long userId;

    @TableField("head_photo")
    private String headPhoto;

    @TableField("nickname")
    private String nickname;

    //评论点赞数量
    @TableField("liked_count")
    private Long likedCount;

    //是否是父级评论，如果是则为0,否则为1
    @TableField("root_comment")
    private Integer rootComment;

    //当评论为子评论时，该id指向父评论Id，否则为0
    @TableField("to_root_comment_id")
    private Long toRootCommentId;

    //评论类型，当为0时是文字评论，1为图片评论，2则未文字与图片混评
    @TableField("type")
    private Integer type;

    @TableField("comment")
    private String comment;

}
